package com.example.springcloud.service;

import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2024-02-06
 * Time: 23:47
 */

// 使用这个类处理整个 Service 的服务降级
// 进一步地解耦合，减少和 Controller 的交叉
@Component
public class PaymentFallbackService implements PaymentHystrixService{
    @Override
    public String paymentInfo_OK(Integer id) {
        return "PaymentFallbackService 的 paymentInfo_OK 实现类兜底";
    }

    @Override
    public String paymentInfo_Timeout(Integer id) {
        return "PaymentFallbackService 的 paymentInfo_Timeout 实现类兜底";
    }
}
